<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'tree-form',
	'enableAjaxValidation'=>false,
    'htmlOptions' => array(
        'enctype' => 'multipart/form-data',
    )
)); ?>


	<?php echo $form->errorSummary($model); ?>
    
    <div class="row">
		<?php echo $form->labelEx($model,'id_typetree'); ?>
		<?php echo CHtml::activeDropDownList($model,'id_typetree',$model->getTypeTreeOptions());
            //echo CHtml::activeDropDownList($model,'id_typetree',CHtml::listData(Treetype::model()->findAll(array('order' => 'name')), 'id_typetree', 'name'));
         ?>
		<?php echo $form->error($model,'id_typetree'); ?>
	</div>
    
	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'prize'); ?>
		<?php echo $form->textField($model,'prize'); ?>
		<?php echo $form->error($model,'prize'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'province'); ?>
		<?php echo $form->textField($model,'province',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'province'); ?>
	</div>
    	<div class="row">
		<?php echo $form->labelEx($model,'picture'); ?>
		<?php echo $form->fileField($model,'picture',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'picture'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'maintext'); ?>
		<?php $this->widget('application.extensions.fckeditor.FCKEditorWidget',array( 'model'=>$model,
        'attribute'=>'maintext',
          # Additional Parameter (Check http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html)
          "config" => array(
              "height"=>"400px",
              "width"=>"100%",
              "toolbar"=>"Full",
              ),
         
                "fckeditor"=>Yii::app()->basePath."/../fckeditor/fckeditor.php",
            									# Path to fckeditor.php
            	"fckBasePath"=>Yii::app()->baseUrl."/fckeditor/",
            									# Relative Path to the Editor (from Web-Root)
            	"config" => array("EditorAreaCSS"=>Yii::app()->baseUrl.'/css/index.css',),
									# Additional Parameters
          ) ); ?>
		<?php echo $form->error($model,'maintext'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->